package me.ereach.inheritance;

public class Employee extends Person {
    private float baseSalary;
    private float hourlyRate;
    private float extraHours;

    public Employee(String name, String gender, float baseSalary, float hourlyRate, float extraHours) {
        super(name, gender);

        this.baseSalary = baseSalary;
        this.hourlyRate = hourlyRate;
        this.extraHours = extraHours;
        System.out.println("Constructor Employee is called.");
    }

    @Override
    public String toString() {
        return "Employee { " + super.toString() + ", baseSalary: " + baseSalary + ", hourlyRate: " + hourlyRate + ", extraHours: " + extraHours + " }";
    }
}
